package com.liezh.visitor.property;

import java.util.HashMap;
import java.util.Map;

public class BeanDefinitionVisitor {
    private Map<String, Object> maps = new HashMap<>();

    public void visitBeanDefinition(StringBeanDefinition bd) {
        if (bd.getDependsOn() != null) {
            // 先获取依赖的配置
        }
        String key = bd.getPropertyKey();
        String value = bd.getPropertyValue();
        System.out.println(value);
        maps.put(key, value);
    }

    public Map<String, Object> readProperty() {
        System.out.println(maps.toString());
        return maps;
    }
}
